﻿using System;
using System.Collections.Generic;
using System.Text;

namespace SAD.DataCenter.AntiAttack
{
    /// <summary>
    /// 过滤词的组
    /// </summary>
    class WordGroup
    {
        //NOTE::用于装载一组具有同一个字开头的过滤词

        private List<WordEntity> _words;

        public WordGroup()
        {
            _words = new List<WordEntity>();
        }

        public void AppendWord(string word, FilterResult handleType)
        {
            AppendWord(new WordEntity() { Word = word, HandleType = handleType });
        }

        public void AppendWord(WordEntity word)
        {
            _words.Add(word);
        }

        public int Count
        {
            get { return _words.Count; }
        }

        public WordEntity GetItem(int index)
        {
            return _words[index];
        }
    }
}
